Interface and Navigation
- Phase 1: Row 1 controls
- Phase 2: Row 2 controls
- Phase 3: Results grid and export
- Phase 4: Banners and confirmation modals
Row 1 contains four input fields and a Refresh button, ordered left to right: Installed Capacity · Event · Database · Demand / Net Demand · ↻ Refresh.
Installed Capacity
An optional MW override for the Daily Available Reserve calculation. Label includes a ⓘ icon with tooltip: Optional. Overrides the total installed capacity (MW) computed from the database when calculating the Daily Available Reserve. Leave blank to use the database value.
A × button clears the override; it is visible only when the input is non-empty. The placeholder reads MW (from database) initially; after a successful run it shows the actual database value (for example 24,531 MW (from database) or 14,567 MW (from database, excl. solar+wind) for net demand). The field is always enabled — all three methods (Random, Part Random, Optimised) support the override.
Error state: red border plus an inline error message when the value is not a valid number.
Event Dropdown
Label: Event. Lists .csv files from DirEvt. A × button clears the selection (clears exception overrides; preserves Start/End dates). A warning appears when the selected file contains events outside the schedule date range: This file contains event(s) outside the maintenance schedule date range.
The dropdown is disabled only on configuration errors or when an event file is locked for the current run. Five placeholder states distinguish configuration errors:
No Defaults.csv foundDefaults.csv has no DirEvt keyDirEvt directory not readableNo .csv files in DirEvtNo applicable event/No event files found
Database Dropdown
Label: Database. Lists .db, .sqlite, and .sqlite3 files from DirDB whose names begin with SysWESM. Tooltip on the dropdown: DirDB: {path} when resolved, or DirDB not resolved — check Defaults.csv. A × button clears the manual selection and falls back to the global PoolDB resolver.
Six placeholder states:
No Defaults.csv foundDefaults.csv has no DirDB keyDirDB directory not readableNo database files in DirDBN database file(s) found, none named SysWESM*No database files found
A DB-source warning banner appears above the controls when the database was resolved via fallback (warn severity) or is missing (error severity).
Demand Dropdown
Label: Demand / Net Demand. Lists .csv files from DirDem. Files whose known span is under 365 days are hidden from the list (they remain selectable only if previously selected as the lone option). Selecting a file auto-populates Start and End dates if they are empty. A × button clears the selection (preserves Start/End dates). A non-blocking short-coverage warning appears when a demand file covering fewer than 365 days is selected.
Refresh Button
Label: ↻ Refresh. Sits adjacent to the Demand / Net Demand dropdown inside Row 1. Tooltip: Re-read event files, demand files, and unit data from Defaults.csv. Preserves Area, Start/End dates, and exclusion overrides across a refresh. Disabled while a refresh or solve is in progress; shows a spinner and Refreshing… while running.
Row 2 contains date pickers, two dropdowns, conditional controls, and three action buttons: Start Date · End Date · Area · Method · (Randomness slider) · (Seed input) · Run · Ok · Cancel.
Start Date and End Date
Format: MM/DD/YYYY text inputs, each with a calendar picker icon. Label tooltips: The first day of the 365-day scheduling period. / The last day of the 365-day scheduling period.
Both are disabled when the loaded demand file is exactly 365 days (tooltip: The loaded demand is exactly 365 days, so the dates are fixed.). When demand exceeds 365 days, adjusting one date may snap the other to maintain the 365-day minimum (snap notes: End date moved forward to keep the 365-day minimum. / Start date moved back to keep the 365-day minimum.).
Area Dropdown
Label: Area. Tooltip: Filters the schedule view by power-system area; POOL shows all areas together. Options: POOL (All) plus one per region from the database's Regions table. Default: POOL (All).
Before a run, Area is a scheduling input (which units are included in the solve). After a run, Area becomes a display filter only.
Method Dropdown
Label: Method. Three options: Random, Part Random, Optimised. Tooltip: Selects how maintenance windows are assigned: Random spreads them randomly, Part Random adds bounded jitter, Optimised finds the best spread.
Demand vs. Net Demand is auto-derived from the loaded demand file — it is not controlled by the Method selection. The method tooltip shows the active demand kind.
Randomness Slider
Appears only when Method is Part Random. Label: Randomness. Range slider 0–100%, step 1; current value shown as {N}%. Tooltip: Controls how far maintenance windows can shift from the optimised position (0 % = none, 100 % = fully random). Disabled while solving.
Seed Input
Appears only when Method is Random or Part Random. Label: Seed. Number input, placeholder auto. Tooltip: Optional integer seed for the random number generator; leave blank for a different random result each run. Not persisted between sessions. Disabled while solving.
Run Button
Label: Run (idle) / Solving… with spinner (in progress). Disabled until all run prerequisites are met and no accepted schedule is locked. The tooltip shows the first block reason when disabled. When blocked by an accepted-schedule lock: Click Cancel to clear the accepted schedule before running again.
Ok Button
Label: Ok. Enabled only when the scheduler state is SOLVED. Tooltip: Accept the schedule — keeps it in memory and display. Transitions the state from SOLVED to ACCEPTED and sets the accepted-schedule lock.
Cancel Button
Label: Cancel. Enabled in SOLVED or ACCEPTED state. Tooltip: Discard the maintenance schedule (requires confirmation). Opens an in-app confirmation modal (not window.confirm()).
This phase covers the scheduler's state machine, the results grid and its columns, the row footer, and the export strip.
State Machine
Three states:
- EMPTY — initial state and the state after Cancel; the grid shows an empty-state message.
- SOLVED — a successful run has completed; the grid shows the schedule.
- ACCEPTED — Ok was pressed in SOLVED state; the schedule is locked. Run is blocked until Cancel is pressed.
Cancel from SOLVED or ACCEPTED returns to EMPTY.
Run Prerequisites
The Run button is disabled unless all of the following are met:
- A system database is resolved (via PoolDB or manual selection).
- A demand CSV file is loaded.
- The demand file spans at least 365 days.
- At least one schedulable unit exists (not all have MDays = 0 or are excluded).
- The Installed Capacity override (if entered) is a valid number.
Also disabled while a solve is in progress or an accepted schedule is locked.
Results Grid
Two-level header (group band row + column row). Columns left to right:
Exc · EID · Unit ID · MaxCap · MT ID · Avail% · FOR% · POR% · MT Year · MT Cycle · MDays · Start · End
Rows are colour-coded by fuel type (FType from the Sites table). The Exc column holds a checkbox: checked = excluded from scheduling. Deferred units show Deferred in Start and End. Numeric values (Avail%, FOR%, POR%) formatted to 1 decimal place; null shows —. EID shows — when no event file is loaded.
Grid Empty States
Run the scheduler to view the maintenance schedule.— initial (EMPTY) stateNo schedule to display.— solve returned no unitsNo units found for the selected area.— area filter eliminates all rows
Footer
Format: {N} eligible unit(s) of {M} shown · {K} deferred (deferred count suppressed when zero). Hidden while loading or on load error. "Eligible" means not excluded (Exc checkbox unchecked).
Export Save As Strip
Location: below banners, above the grid. Active only when the scheduler state is SOLVED or ACCEPTED (disabled in EMPTY). Label on the dropdown: Export File.
Six export options:
Maintenance Schedule→Ev_MS_{filename}.csvDaily Maintenance Outage→DMS_{filename}.csvDaily Max Demand/Net Demand→DMD_{filename}.csvDaily Available Reserve→DAR_{filename}.csvDaily Net Reserve→DNR_{filename}.csvAll— writes all five files at once
Filename input (max 120 chars). The Save button shows Saved (green) or Failed (red) for 5 seconds on completion. All files are written to DirEvt.
This phase covers the conditional banners that appear between or above the controls, and the two confirmation modals.
Solve Status Banners
Three banner types appear between controls and grid after a run:
- Solve error:
Solve error: {message}— red, shown when the last run failed. - Solve status message: info banner after successful save (for example
Saved N file(s): {names}). - Solver status notice:
info,warn, orerrorseverity after a run.
Database Source Warning
Shown above the controls:
- Warn severity: PoolDB was resolved via fallback.
- Error severity: PoolDB is missing (no database resolved).
- Also shown when the resolved PoolDB file is not in the SysWESM* filtered list:
PoolDB "{name}" is not in the filtered database list (not a SysWESM* file?).
Demand Issues Warning
If the demand CSV contains missing, zero, or incorrect intervals, a warning appears: missing, zero or incorrect intervals found (N missing, N zero, N incorrect). Use [Files Downloader > Historical Store] > Interpolate/Extrapolate Data to fill them.
The Files Downloader > Historical Store text is a clickable button that navigates the Suite to the dlutil / historical page.
Demand Quality Notices
Non-blocking info/warn bullets for demand CSV quality issues:
N days missing – e.g. {date1}, {date2}, {date3} and N moreN days had duplicate hours – highest value keptN short days under 24 h – daily peak may be understatedN days with zero demand across all regions – e.g. {dates}
Cancel Confirmation Modal
Opened when the Cancel button is pressed. Title: Discard maintenance schedule?. The body explains that no files are deleted. Two buttons:
- Keep Schedule — non-destructive action; receives initial focus
- Discard — clears the schedule and returns to EMPTY
Overwrite Confirmation Modal
Opened when the Save button would overwrite existing files. Title: Overwrite existing file(s)?. Lists the existing files. Two buttons:
- Cancel — aborts the save; receives initial focus
- Overwrite — proceeds with overwriting